<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String name=(String)session.getAttribute("LoginName");

%>
<%if(name==null){
	%>
	<div class="" style="margin-right:20px;padding:0px 20px;">
	
	<form name="form1" action="LoginServlet" method="post" onsubmit="return check();">
	
		<label>登录账号&emsp;<input type="text" id="userLoginName" name="userLoginName" style="width:115px; height:20px; line-height:20px; color:#666; border:1px solid #CCC; margin-top:20px;" /></label>
		<br />
		<label>登录密码&emsp;<input type="password" id="passWord" name="passWord" style="width:115px; height:20px; line-height:20px; color:#666; border:1px solid #CCC; margin-top:10px;" /></label>
		<br/>
		
		<label>验&nbsp;证&nbsp;码&emsp;
		<input type="text" id="inputCheckCode" name="inputCheckCode" value="" style="width:64px; height:20px; line-height:20px; color:#666; border:1px solid #CCC; margin-top:10px;" /></label>
		<%--<a href="pages/registerlogin/foundpwd.jsp">忘记密码？</a><br />
		--%><img alt="请输入四位的验证码" src="pictureCheckCodeServlet" id="pictureCheckCode">
		
		<a href="javascript:changeImg();" title="更换一张验证码图片">看不清，换一张</a><br>
		<input type="submit" value="" style="background:url(images/absulote/button_1.png) no-repeat; width:86px; height:22px; cursor:pointer; margin-top:16px;" /> 
		<input type="button" name="button" id="button" value="" onmousedown="register();" style="background:url(images/absulote/button_2.png) no-repeat; width:86px; height:22px; cursor:pointer; margin-top:16px;" />
						
	</form>
	</div>
	<%
}else{
	int levelid=0;
	String str_Levelid=(String)session.getAttribute("LevelID");
	String str_UserImg=(String)session.getAttribute("UserImg");
	String UserID=(String)session.getAttribute("userID");
	System.out.println("sssss"+UserID);
	if(str_Levelid!=null){
		levelid=Integer.parseInt(str_Levelid);	
	}
	%>
	<form name="form1" action="RegisterServlet" method="post" >
	<div class="AfterLogin" style="padding:30px 20px;">
		 <div class="left" style="margin-right:20px;">
		 	
		 		<img src="<%=str_UserImg %>" style="width:80px; height:80px;"/>
		 	
		 </div>
		 <div class="right" style="line-height:24px; color:#333; ">
		 	<p>会员名：<%=name %></p>
		 	<p>等&emsp;级：<%=levelid %></p>
		 	<p>积&emsp;分：0</p>
		 	
		 <br/>
		 <a href="LogoutServlet"> 退出</a>
		 </div>
	</div>
	</form>
	<%
}
%>
